<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container">
    <h2>用户登录</h2>
    <form action="LoginServlet" method="post">
        <label>用户名:</label>
        <input type="text" name="username" required>

        <label>密码:</label>
        <input type="password" name="password" required>

        <label>验证码:</label>
        <input type="text" name="captcha" required>
        <div>
            <img src="CaptchaServlet" alt="验证码">
        </div>

        <input type="submit" value="登录">
    </form>

    <c:if test="${not empty error}">
        <p style="color: red; text-align: center;">${error}</p>
    </c:if>
</div>
</body>
</html>
